﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AspMvcWebClient.Models;

namespace AspMvcWebClient.ExampleDataCalls
{
    public static class ExampleData
    {
        public static List<GameSession> GameSessions()
        {

            var player1 = new Player { ID = 1, Name = "Oskar" };
            var player2 = new Player { ID = 2, Name = "Martin" };
            var player3 = new Player { ID = 3, Name = "Henke" };
            var player4 = new Player { ID = 4, Name = "Mange" };

            var game1 = new Game { ID = 1, Name = "StenSaxPåse" };
            var game2 = new Game { ID = 2, Name = "Spel 2" };

            var model = new List<GameSession> {
                new GameSession
                {
                    ID = 1,
                    Game = game1,
                    NumberOfRounds = 10,
                    Players = new List<Player> { player1 }
                }, 
                new GameSession
                {
                    ID = 2,
                    Game = game1,
                    Players = new List<Player> { player2 }
                }, 
                new GameSession
                {
                    ID = 3,
                    Game = game2,
                    NumberOfRounds = 5,
                    Players = new List<Player> { player2 }
                }, 
                new GameSession
                {
                    ID = 4,
                    Game = game1,
                    NumberOfRounds = 20,
                    Players = new List<Player> { player3 }
                },
            };

            return model;
        }

        public static List<Game> Games()
        {
            return new List<Game> { 
                new Game { ID = 1, Name = "StenSaxPåse" },
                new Game { ID = 2, Name = "Spel 2" },
                new Game { ID = 3, Name = "Schack" },
                new Game { ID = 4, Name = "Risk" }
            };
        }

        public static List<Player> Players()
        {
            return new List<Player> {
                new Player { ID = 1, Name = "Oskar" },
                new Player { ID = 2, Name = "Martin" },
                new Player { ID = 3, Name = "Henke" },
                new Player { ID = 4, Name = "Mange" }
            };
        }
    }
}